<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
    <title>文件列表</title>
    <!--标准mui.css-->
    <link rel="stylesheet" href="../css/mui.min.css">
    <script src="../js/mui.min.js"></script>
    <!--App自定义的css-->
    <link rel="stylesheet" type="text/css" href="../css/app.css" />
    <link rel="stylesheet" href="../npl/css/vant.mini.css" />
    <script src="../js/vue.js"></script>
    <link rel="stylesheet" href="./yuyinwenzi/voice.css">
    <!-- 语音文字组件 -->
    <script src="../js/jquery-3.6.0.min.js"></script>
    <script src="../js/vconsole.min.js"></script>
    <script src="../js/sm2.js"></script>
    <script src="../js/sm3.js"></script>
    <!-- <script src="../js/feedback.js"></script> -->
    <script src="../js/clipboard.js"></script>
    <script src="../js/flexible.js"></script>
    <script src="../npl/js/vant.mini.js"></script>
    <script src="../js/elementui.js"></script>
    <link rel="stylesheet" href="../css/elementui.css">
    <script src="./text.js" type="text/javascript"></script>
    <script src="../js/spark-md5.min.js"></script>
    <style>
        #app {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: #fff !important;
        }

        .trainTicketstitle {
            /* background-image: linear-gradient(to right, rgb(13, 121, 131), rgb(25, 179, 182)); */
            /* padding: 0rem 0.2rem; */
            color: #fff;
            height: 1rem;
            font-size: 0.35rem;
        }

        .mui-btn-blue,
        .mui-btn-primary,
        input[type=submit] {
            background-color: rgb(25, 179, 182);
            color: #fff;
            border: 1px solid rgb(25, 179, 182);
            border-radius: 4px;
            margin-right: 10px;
        }

        .mui-toast-container {
            top: 50%;
        }

        ::-webkit-input-placeholder {
            color: black;
        }

        .mui-pull-left {
            color: #fff;
        }

        .left {
            text-align: center;
        }

        .left b {
            line-height: 0.5rem;
            color: #fff;
        }

        .left .left1 {
            position: absolute;
            left: 0.1rem;
            top: 0.25rem;
        }

        .left_title {
            line-height: 0.5rem;
            color: #fff;
            font-weight: 600;
        }

        .List {
            /* height: calc(100% - 3rem) !important;
            height: calc(100% - 3rem - constant(safe-area-inset-bottom));
            height: calc(100% - 3rem -env(safe-area-inset-bottom)); */
            /* border-radius: .2rem; */
            flex: 1;
            /* padding: 0 .5rem; */
            overflow-y: scroll;
            position: absolute;
            width: 100%;
            top: calc(46px + .3rem);
            bottom: calc(25px + 1.3rem);
        }

        #openFile {
            background: none !important;
            /* position: absolute; */
            font-weight: 500;
            color: #5f84f7;
            font-size: 11px;
            /* width: 20%; */
            height: 100%;
            top: 0;
            right: 0rem;
            padding: 0;
            border: none;
        }

        .transition_btn {
            /* margin-left: 10px; */
            border-radius: 50px;
            font-size: 13px !important;
        }

        .uplode {
            /* width: 100%; */
            position: fixed;
            z-index: 2000 !important;
            right: 25px;
            bottom: 25px;
            /* padding: 0 20px; */
        }

        .uplode_img {
            width: 1.4rem;
            /* float: right; */
            height: 1.4rem;
        }

        /* #form-user{
            width: 100%;
            float: right;
            height: 100%;
        } */
        .form-user {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .uplode_img img {
            width: 100%;
            height: 100%;
        }

        .wrpper {
            /* width: 34px; */
            height: 64px;
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
        }

        .List_wrapper .List_access {
            /* width: 1.5rem; */
            height: 16px;
            margin-left: 3px;
            line-height: 16px;
            background-color: rgba(95, 132, 247, 0.08);
            border-radius: 18px;
            font-family: PingFang SC;
            color: #2d343c;
            font-size: 10px;
            padding: 0 5px;
            /* border-right: 1px solid #ccc; */
            color: rgb(199, 197, 197);
            /* left: 55%;
              top: -2% */
            float: left;
        }

        .List_wrapper .List_time {
            height: 16px;
            line-height: 16px;
            /* background-color: rgba(95, 132, 247, 0.08); */
            border-radius: 18px;
            font-family: PingFang SC;
            color: #2d343c;
            font-size: 10px;
            padding: 0 5px;
            /* position: absolute; */
            /* float: left; */
            display: flex;
            /* align-items: center; */
            /* justify-content: space-between; */
            /* border-right: 1px solid #ccc; */
            color: #5f6871;
            font-size: 13px;
            left: 0%;
            top: 0%
        }

        .List_wrapper {
            height: 16px;
            width: 215px;
            line-height: 16px;
            /* position: absolute; */
            display: flex;
            margin-bottom: .3rem;
            /* left: 0; */
            /* top: 13% */
        }

        .List_wrapper1 {
            height: 16px;
            width: 85%;
            line-height: 16px;
            position: absolute;
            left: 17%;
            top: 52%
        }

        .List_img_clock {
            width: .3rem;
            height: .3rem;
        }

        .List_img img {
            width: 100%;
            height: 100%;
        }

        .List_img {
            width: .7rem;
            height: .7rem;
            margin-right: 15px;
        }


        .van-cell {
            padding: 0 10px !important;
            background: none !important;
        }

        #multipartFile1 {
            width: 100%;
            height: 100%;
            position: absolute;
            opacity: 0;
            left: 0;
            top: 0;
            z-index: 999;
        }

        .form_btn {
            width: 100%;
            display: flex;
            padding: 0 5%;
            justify-content: space-between;
        }

        .form_btn .qx {
            width: 47%;
            background-color: rgba(45, 52, 60, 0.08);
            border-radius: 48px;
            font-family: PingFang SC;
            color: rgba(45, 52, 60, 0.8);
        }

        .form_btn .tj {
            width: 47%;
            background-color: #5f84f7;
            color: #fff;
            border-radius: 48px;
        }

        .van-popup--center {
            border-radius: 12px;
            width: 90%;
            padding: 20px 10px;
            display: flex;
            justify-content: space-around;
            flex-direction: column;
            height: 50%;
        }

        .van-cell {
            align-items: center;
            padding: 10px 2px 10px 5px;
            justify-content: space-between;
        }

        .popWrapper {
            width: 100%;
            height: 100%;
            justify-content: center;
            align-items: center;
            display: flex;
            flex-direction: column;
        }

        .fileImg {
            width: 100%;
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 14px .3rem 0;
        }

        .pop_title {
            font-family: PingFang SC;
            font-weight: bold;
            color: #2d343c;
            font-size: 16px;
        }

        .upload_img {
            width: 100%;
            height: 4.5rem;
        }

        .form_wrapper {
            display: flex;
            width: 100%;
            height: 100%;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding-top: .5rem;
        }

        .form_img {
            width: 25%;
            height: 38%;
        }

        .form_img img {
            width: 100%;
            height: 100%;
        }

        .form_text {
            font-weight: 500;
            margin-top: 4px;
            color: rgba(45, 52, 60, 0.6);
            font-size: 14px;
        }

        .flowPath {
            width: 100%;
            flex: 1;
        }

        .wrpper {
            /* width: 34px; */
            margin-top: 5px;
            height: 100%;
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
        }

        .wrpper_warp {
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
            padding: 0 .5rem;
            background-color: #fff;

        }

        .wrpper_warp:active {
            filter: brightness(97%);
        }

        .wrpper1 {
            /* width: 34px; */
            /* height: 64px; */
            width: 100%;
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
            padding: .4rem 0;
            border-bottom: 1px solid #f1f1f1;
        }

        .List_img img {
            width: 100%;
            height: 100%;
        }

        .List_img {
            width: .7rem;
            height: .7rem;
            /* position: absolute; */
            /* left: 0;
    top: 6% */
        }

        .List_title1 {
            width: 100%;
            height: .5rem;
            line-height: .5rem;
            position: absolute;
            font-family: PingFang SC;
            font-weight: 500;
            color: #2d343c;
            font-size: 13px;
            left: 16%;
            top: 20%
        }

        .List_title {
            width: 100%;
            /* height: .5rem; */
            line-height: .5rem;
            /* position: absolute; */
            font-family: PingFang SC;
            font-weight: 600;
            color: #2d343c;
            font-size: 16px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            /* left: 0%; */
            /* top: 48% */
        }

        .van-popup__close-icon--top-right {
            top: 11px;
            right: 11px;
        }

        .icon_del {
            /* position: absolute; */
            top: 20px;
            position: absolute;
            z-index: 1;
            cursor: pointer;
            right: 20px;
        }

        .omit {
            /* width: 200px; */
            /* display: flex;
            align-items: center; */
            display: flex;
            flex-direction: column;
            width: 90px;
            display: flex;
            align-items: center;
            justify-content: center;

        }

        .omit_img {
            width: 10px;
            height: 10px;
        }

        .omit_img img {
            width: 100%;
            height: 100%;
        }

        #openFile .van-progress {
            /* position: absolute; */
        }

        #openFile .van-progress__pivot {
            background: none !important;
        }


        #circle_img {
            animation: none;
            width: 100%;
            height: 100%;
        }

        @-webkit-keyframes circle {
            0% {
                -webkit-transform: rotate(0deg);
                transform: rotate(0deg);
            }

            100% {
                -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
            }
        }

        @-moz-keyframes circle {
            0% {
                -moz-transform: rotate(0deg);
                transform: rotate(0deg);
            }

            100% {
                -moz-transform: rotate(360deg);
                transform: rotate(360deg);
            }
        }

        @keyframes circle {
            0% {
                -webkit-transform: rotate(0deg);
                transform: rotate(0deg);
            }

            100% {
                -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
            }
        }

        [v-cloak] {
            display: none !important;

        }

        /* 解决组件黑边 */
        .van-swipe-cell__right {
            margin-right: -1px;
        }



        .van-dialog__message--has-title {
            padding-top: 16px;
        }

        .list-enter-active,
        .list-leave-active {
            transition: all 0.5s;
        }

        .list-enter,
        .list-leave-to

        /* .list-leave-active in <2.1.8 */
            {
            opacity: 0;
            transform: translateY(-30px);
        }

        .right_btn {
            width: 120px;
            height: 100%;
            display: flex;
            justify-content: space-between;
            background-color: #29d079;
        }

        .btn_l,
        .btn_l {
            width: 50%;
            height: 100%;
        }

        .van-button__content {
            display: flex;
            flex-direction: column;
        }

        .right_btn .van-icon__image {
            width: 1.5em;
            height: 1.5em;
        }

        .right_btn .van-button__icon {
            width: 1.5em;
            height: 1.5em;
        }

        .van_pop {
            align-items: center;
            height: 47%;
            padding: 10px !important;
        }

        .van-button--primary {
            background-color: #19A97B;
        }

        .p_btn {
            width: 48%;
            height: .8rem;
            background-color: #13C09B;
            border-radius: 30px;
            color: #fff
        }

        .van_pop_text {
            color: #000;
            font-size: 18px;
            font-weight: bold;
        }

        .checkBtn {
            width: 80%;
            height: 50%;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            /* border: 1px #13C09B dashed; */
        }

        .van-radio__icon--checked .van-icon {
            background-color: #13C09B;
            border-color: #13C09B
        }

        /* .van-radio:nth-child(1) {
            margin-bottom: .7rem;
        } */
        .radio_img {
            width: 65px;
            height: 65px;
            margin-bottom: .4rem;
        }

        .radio_img img {
            width: 100%;
            height: 100%;
        }

        .van-radio-group {
            display: flex;
        }

        .radio_box {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .radio_box:nth-child(1) {
            margin-right: 1rem;
        }

        .tishi {
            position: absolute;
            bottom: -.42rem;
            left: .48rem;
            color: red;
            z-index: 1;
            font-size: 13px;
        }

        .file-size-small {
            font-weight: 500;
            margin-top: 4px;
            color: rgba(45, 52, 60, 0.6);
            position: absolute;
            bottom: .4rem;
            font-size: 11px;
        }

        .back_r {
            width: .42rem;
            height: .48rem;
            line-height: .38rem;
        }

        .van-popover[data-popper-placement=bottom-end] {
            position: absolute;
            /* left: 290px; */
            top: 40px !important;
            right: 10px !important;
            left: 170px !important;
            margin: 0px;
        }

        .van-popover__action {
            width: 100%;
        }

        ul .van-swipe-cell {
            /* height: 100px !important; 设置为你需要的高度 */
        }

        ul .wrpper1 {
            padding: .3rem 0;
            /* height: 100px !important; 设置为你需要的高度 */
        }
    </style>
</head>

<body>
    <div id="app" style="display:flex;flex-direction: column;" v-cloak>
        <div class="is-loading">
            <div class="is-loading">
                <div class="curtain" id="curtain">
                    <div class="loadingBgc">
                        <div class="loader"></div>
                    </div>
                </div>
            </div>
        </div>
        <div style="margin-bottom: .3rem;position: relative;" class='trainTickets'>
            <div class='trainTicketstitle'>
                <div class="header_tit">
                    <van-nav-bar title="智能会议" left-arrow>
                        <template #left>
                            <div class="back_l" @click="home"><img src="../image/left.png" alt=""></div>
                        </template>
                        <template #right>
                            <div class="back_r">
                                <van-popover placement="bottom-end" v-model="showPopover" trigger="click"
                                    :actions="actions" @select="onSelect">
                                    <template #reference>
                                        <img src="../image/more.png" alt="">
                                    </template>
                                </van-popover>
                            </div>
                            <!-- <div class="back_r" style=" width: .42rem;height: .38rem;" @click="showPop('youx')"><img
                                    id="circle_img" src="../image/luyilu_yysend.png" alt=""></div> -->
                        </template>
                    </van-nav-bar>
                </div>
            </div>
            <span class="tishi">仅保留30天音频文件</span>
        </div>
        <div class="List" v-cloak>
            <van-list v-model="loading" :finished="finished" @load="getShorthandList" finished-text="没有更多了">
                <transition-group name="list" tag="ul">
                    <van-swipe-cell v-for="(item,index) in dataWithoutSuffix" :key="item.id">
                        <div class="wrpper_warp " @click="shorthandBtn(index,item)">
                            <div class="wrpper1 ">
                                <div style="width: 50%">
                                    <!-- 查看 -->
                                    <!-- <div class="List_img"><img src="../image/voice.png" alt=""></div> -->
                                    <div class="List_wrapper">
                                        <img class="List_img_clock" src="../image/clock.png" alt="">
                                        <span class="voice_length"></span>
                                        <div class="List_time">
                                            <span style="margin-right: 15px;">{{ item.voiceDuration | voiceDurationText
                                                }}</span>
                                            <span>{{ item.createTime | dateTimeText }}</span>
                                        </div>
                                    </div>
                                    <div class="List_title" v-text="item.messageTitle "></div>
                                </div>
                                <div class="omit">
                                    <button id="openFile" type="button" v-if="item.translation == 4"
                                        class="transition_btn"
                                        style="background-color: #29d07922!important; padding: 2px 15px; color: #29d079;"
                                        @click.stop="delAddConfirm(1,item.id)">智能优化</button>
                                    <!-- <button id="openFile" type="button" v-if="item.translation == 1" disabled>完成</button> -->
                                    <button id="openFile" v-else-if="item.translation == 3"
                                        @click.stop="delAdd(1,item.id)" class="transition_btn" type="button">重试</button>
                                    <button id="openFile" v-else-if="item.translation == 0" type="button"
                                        class="transition_btn" disabled style="color: #5f6871;">准备优化...</button>
                                    <button id="openFile" v-else-if="item.translation == 5" type="button"
                                        class="transition_btn" disabled style="color: #5f6871;">排队等待...</button>
                                    <button id="openFile" v-else-if="item.translation == 1" type="button"
                                        class="transition_btn" disabled style="color: #29d079;">
                                        <van-icon name="success" size="16px" />
                                    </button>
                                    <button id="openFile" v-else-if="item.translation == 2" type="button"
                                        class="transition_btn" style="border-radius: 0;">
                                        <!-- <van-progress track-color="rgb(146 163 172)" style="width:40px !important"
                              :percentage="percentageBtn" stroke-width="14" /> -->
                                        <div style="color: #5f6871;">
                                            <van-loading size="14px" />正在优化
                                        </div>
                                        <div style="color: #ee5d5d; font-size: 12px;">
                                            还需等待{{ item.recordTime | recordTimeText }}
                                        </div>
                                    </button>
                                    <div class="omit_img"> <img src="../image/leftIcon.png" alt=""></div>
                                </div>
                            </div>
                        </div>

                        <template #right>
                            <div class="right_btn">
                                <div class="btn_l">
                                    <van-button style=" width: 100%;
                            height: 100%;" @click="joinBtn(item)" icon="../image/join.png" square text="分享"
                                        type="primary" />
                                </div>
                                <div class="btn_r">
                                    <van-button style=" width: 100%;
                        height: 100%;border: none;" @click="delAddConfirm(0,item.id)" icon="../image/del1.png" square
                                        text="删除" type="danger" />
                                </div>
                            </div>
                        </template>
                    </van-swipe-cell>
                </transition-group>
            </van-list>
        </div>
        <van-popup class="van_pop" round closeable v-cloak :close-on-click-overlay="false" v-model="showShare">
            <div class="van_pop_text">分享到i国网</div>
            <div class="checkBtn">
                <van-radio-group v-model="radio">
                    <div class="radio_box" @click="radio = '1'">
                        <div class="radio_img"><img src="../image/join3.png" alt=""></div>
                        <van-radio name="1">语音文件</van-radio>
                    </div>
                    <div class="radio_box" @click="radio = '2'">
                        <div class="radio_img"><img src="../image/join2.png" alt=""></div>
                        <van-radio name="2">转写文字</van-radio>
                    </div>
                </van-radio-group>
            </div>
            <van-button @click="downFile" class="p_btn">确 认</van-button>
        </van-popup>
        <van-popup v-cloak :close-on-click-overlay="false" v-model:show="showFile">
            <div class="icon_del" @click="delUplode">
                <van-icon name="cross" />
            </div>
            <div class="popWrapper">
                <div class="pop_title" v-text="showFileType == 'youx' ? '发送语音' : '文件上传'">
                </div>
                <div class="fileImg">
                    <div class="upload_img" :style="{
                        backgroundImage: `url(${showFileType === 'youx' ? '../image/lu_bg2.png' : '../image/lu_bg1.png'})`,
                        backgroundRepeat: 'no-repeat',
                        backgroundSize: '100% 99%' // 新增样式
                      }">
                        <form class="form-user">
                            <div class="form_wrapper" @click="checkFile">
                                <p class="form_text">点击此处上传录音文件</p>
                                <p :class="fileSizeClass">{{ fileSizeMessage }}</p>
                            </div>
                        </form>
                    </div>
                    <div class="flowPath" v-if="progressBar">
                        <div class="wrpper">
                            <div class="List_img"><img
                                    :src="showFileType === 'youx' ? '../image/lu_play1.png' : '../image/lu_play.png'"
                                    alt=""></div>
                            <div class="List_title1">{{fileName | fileNametext}}</div>
                            <div class="List_wrapper1">
                                <el-progress :stroke-width="3" :percentage="progress"
                                    :color="showFileType === 'youx' ? '#4694fd' : '#13C09B'"></el-progress>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </van-popup>
        <van-popup v-cloak :close-on-click-overlay="false" v-model:show="showFileNw">
            <div class="icon_del" @click="delUplode">
                <van-icon name="cross" />
            </div>
            <div class="popWrapper">
                <div class="pop_title">
                    语音同步至内网网站
                </div>
                <div class="fileImg">
                    <div class="upload_img" :style="{backgroundImage: 'url(../image/lu_bg3.png)',backgroundRepeat: 'no-repeat',
                        backgroundSize: '100% 99%' // 新增样式
                      }">
                        <form class="form-user">
                            <div class="form_wrapper" @click="checkFile">
                                <p class="form_text">点击此处上传录音文件</p>
                                <p :class="fileSizeClass">上传文件大小不超过200MB，上传后同步至内网网站</p>
                            </div>
                        </form>
                    </div>
                    <div class="flowPath" v-if="progressBar">
                        <div class="wrpper">
                            <div class="List_img"><img src="../image/lu_play2.png" alt=""></div>
                            <div class="List_title1">{{fileName | fileNametext}}</div>
                            <div class="List_wrapper1">
                                <el-progress :stroke-width="3" :percentage="progress" color="#f6ab00"></el-progress>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </van-popup>

        <div class="uplode" v-cloak @click="showPop('yuyin')">
            <div class="uplode_img">
                <img src="../image/lu_file.png" class="active-brightness" alt="">

            </div>
        </div>
        <div class="uplode" v-cloak style="right:2.4rem" @click="showVoice">
            <div class="uplode_img">
                <img src="../image/lu_luyin.png" class="active-brightness" alt="">
            </div>
        </div>
    </div>

    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                    action: 0,
                    actions: [{
                            id: 0,
                            text: '发送至内网邮箱',
                            icon: '../image/send3.png'
                        },
                        {
                            id: 3,
                            text: '同步至内网网站',
                            icon: '../image/tb2.png'
                        },

                    ],
                    showPopover: false,
                    loading: false,
                    finished: true,
                    listData: [],
                    num: 0,
                    disabled: false,
                    disabledInp: false,
                    showFile: false,
                    showFileNw: false, //同步至中转站的弹框
                    showFileType: '', //区分是右上角的上传 、 右下角的上传
                    filesPdfName: '',
                    filesPdfSize: '',
                    // 设置每个分片的大小（字节）
                    CHUNK_SIZE: 5 * 1024 * 1024 + "", // MB
                    // 分片上传成功索引
                    succeed: [],
                    // 分片上传失败索引
                    // failed: [],
                    currentRate: 0,
                    progress: 0,
                    fileName: '',
                    progressBar: false,
                    showPopdel: false,
                    showIMG: true,
                    count: 0,
                    bodyShow: false,
                    retryNum: 0,
                    debuggFile: false,
                    listTime: null,
                    percentageBtn: 0,
                    estimate: 0,
                    estInterval: null,
                    percentageBtnTime: null,
                    dataTime: null,
                    channelId: '',
                    isflageIOX: false,
                    myindex: -1,
                    showShare: false, //分享按钮
                    radio: '1',
                    formatList: ['mp3', 'wav', 'pcm', 'amr', 'm4a', "MP3", "WAV", "PCM", "AMR", "M4A"],
                    listIds: '',
                    paths: '',
                    listTitle: '',
                    listMessage: '',
                    sceneNo: 31,
                    

                }
            },
            computed: {
               
                dataWithoutSuffix() {
                    return this.listData.map(data => {
                        if (data.messageTitle) {
                            for (let i = 0; i < this.formatList.length; i++) {
                                if (data.messageTitle.endsWith(this.formatList[i])) {
                                    data.messageTitle = data.messageTitle.substring(0, data.messageTitle
                                        .lastIndexOf('.' + this.formatList[i]))
                                }
                            }
                        }
                        return data
                    })
                },
                fileSizeMessage() {
                    return this.showFileType === 'youx' ?
                        '上传文件大小不超过40MB，上传后直接发送到邮箱' :
                        '上传文件大小不超过200MB';
                },
                fileSizeClass() {
                    return 'file-size-small';
                }
            },
            filters: {
                voiceDurationText: (value) => {
                    if (!Number(value)) return "00:00";
                    const h = Math.floor(value / 3600)
                    const m = Math.floor(value % 3600 / 60)
                    const s = Math.floor(value % 60)
                    if (h) {
                        return `${h < 10 ? '0' + h : h}:${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}`
                    } else {
                        return `${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}`
                    }
                },
                dateTimeText: (value) => {
                    if (!value || new Date(value) == 'Invalid Date') return "";
                    const date = new Date(value)
                    const currentY = new Date().getFullYear()
                    const Y = date.getFullYear()
                    const M = date.getMonth() + 1
                    const D = date.getDate()
                    const h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
                    const m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
                    return `${Y}年${M}月${D}日 ${h}:${m}`
                },
                recordTimeText: (value) => {
                    if (!value) return '1分钟';
                    const h = Math.floor(value / 3600)
                    const m = Math.floor(value % 3600 / 60)
                    const s = Math.floor(value % 60)
                    if (h) {
                        return `${h}小时${m}分钟`
                    }
                    if (m) {
                        return `${m}分钟`
                    }
                    return `1分钟`
                },
                fileNametext: (value) => {
                    if (!value) return "";
                    let data = value.split("");
                    if (data.length < 12) {
                        return value;
                    }
                    return value.slice(0, 12) + "...";
                },
            },
            created() {
                const _this = this
                $("#circle_img").css("animation", "circle 1s linear infinite")
                let jsApiList = []
                $.getScript("../js/jweixin-sgccigw-1.0.0.js" /*"js/jweixin-1.0.0.js"*/ , function () {
                    'use strict';
                    wx.ready(function () {
                        wx.onHistoryBack(() => {
                            _this.home()
                            return false
                        })
                    });
                    jsApiList = [
                        'onHistoryBack',
                        'ext_Net_Download',
                        'multiWindows_subscribe',
                        'ext_Net_MultiDownload',
                        'getZipAppDirectory'
                    ];
                    wx.config({
                        beta: true,
                        debug: false,
                        appId: corpid,
                        timestamp: '1626832073',
                        nonceStr: nonceStr,
                        signature: signature,
                        jsApiList: jsApiList
                    });
                });
            },
            mounted() {
                this.$nextTick(() => {
                    this.compatibleInput()
                    this.getShorthandList(0);
                });
                addOperator(0, 0, "0", 0, 0, "0", 0, 0, "10");
            },

            methods: {
                onSelect(action) {
                    this.action = action.id
                    this.showPop('youx')
                },
                createNonceStr(len) {
                    var e = len ? len : 16;
                    var t =
                        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
                        a = t.length,
                        n = "";
                    for (i = 0; i < e; i++)
                        n += t.charAt(Math.floor(Math.random() * a));
                    return n;
                },
                downFile() {
                    $("#curtain").css("display", "block");
                    let that_ = this
                    const timestamp = new Date().getTime() + ""
                    that_.showShare = false
                    if (that_.radio == "2") {
                        that_.checkJion()
                        return
                    }
                    let userId = sessionStorage.getItem("userId");
                    // let recordArr = JSON.parse(res.result)
                    that_.channelId = "net_upload_" + that_.createNonceStr(16) + new Date()
                        .getTime() + "";
                    wx.invoke("multiWindows_subscribe", {
                        channelId: that_.channelId
                    }, function (res) {
                        console.log(res.data.result, "监听的数据")
                        if (res.data.event == "success") {
                            $("#curtain").css("display", "none");
                            console.log(res.data.result.replace("file://", ""), 888)
                            wx.invoke("ext_Intent_SystemShare", {
                                data: {
                                    content: res.data.result.replace("file://", ""),
                                    contentType: "FilePath",
                                    fileName: "10086",
                                }
                            }, function (res) {
                                wx.invoke("getZipAppDirectory", {
                                    "type": "STORAGE_ROOT_DIR", //APP_ROOT_DIR
                                }, function (res) {
                                    console.log(res, 999)
                                    that_.paths = res.directory
                                    console.log(that_.paths, "that_.paths")
                                    if (that_.isflageIOX) {
                                        wx.invoke("ext_FileManager_Remove", {
                                                "data": {
                                                    fileList: [that_.paths +
                                                        "voice.mp3",
                                                    ]
                                                }
                                            },
                                            function (res) {
                                                console.log(
                                                    "ext_FileManager_Remove",
                                                    res);
                                            })
                                    }

                                })
                            })
                        }
                    })

                    //获取绝对路径
                    var path
                    wx.invoke("getZipAppDirectory", {
                        "type": "STORAGE_ROOT_DIR", //STORAGE_ROOT_DIR
                    }, function (res) {
                        console.log(res, "路径")
                        var path = res.directory ? res.directory : ''
                        // 2.开始下载任务
                        let voiceSign = sm3(timestamp + "&" + that_.listIds);
                        wx.invoke("ext_Net_Download", {
                            data: {
                                cmd: "download",
                                url: localUrlLink + iscp_port +
                                    `/tjAiAssistant/voice/downloadAudioFileById?Authentication=${sessionStorage.getItem("Authentication")}&id=${that_.listIds}&sign=${voiceSign}&timestamp=${timestamp}`, //下载url地址
                                header: {},
                                id: that_.channelId, //与channelId保持一致
                                timeout: 10,
                                fileName: "voice.mp3", //保存的文件名
                                path: path //文件保存路径使用getZipAppDirectory获取
                            }

                        }, function (res) {
                            console.log("downloadfile ", res);
                            if (res.event === 'start') { //任务开始成
                                console.log("任务id：", res.id)
                            }
                            if (res.event === 'fail') { //任务失败
                            }
                        })
                    })

                },
                checkJion() {
                    data = {
                        sceneNo: this.sceneNo,
                        text: this.listMessage,
                        title: this.listTitle
                    }
                    greneralRequest("/tjAiAssistant/shareFile/shareToBase64", JSON.stringify(data))
                },
                joinBtn(item) {
                    this.radio = "1"
                    if (item.translation == 0 || item.translation == 2 || item.translation == 5) {
                        mui.toast("音频文件正在转写，请稍后分享", {
                            duration: "long",
                            type: "div",
                        });
                        return
                    } else {
                        this.listIds = item.id
                        this.listTitle = item.messageTitle
                        this.listMessage = item.sectionMessage ? item.sectionMessage : item.message
                        this.sceneNo = item.sectionMessage ? 33 : 31 //33离线  31实时  //36实时摘要  37离线摘要
                        this.showShare = true
                    }

                },
                
                // 判断安卓还是ios
                compatibleInput() {
                    //获取浏览器的userAgent,并转化为小写
                    var ua = navigator.userAgent.toLowerCase();
                    //判断是否是苹果手机，是则是true
                    var isIos = ua.indexOf("iphone") != -1 || ua.indexOf("ipad") != -1;
                    if (isIos) {
                        this.isflageIOX = true;
                    } else {
                        this.isflageIOX = false;
                    }
                },
                showVoice() {
                    setTimeout(() => {
                        window.sessionStorage.removeItem("OnSiteShorthandItem");
                        $(location).attr("href", "OnShorthandDetails.html")
                    }, 10)
                },
                showPop(type) {
                    this.showFileType = type
                    let obj = this.listData.find(item => item.translation == 0 || item.translation == 2)
                    if (obj) {
                        mui.toast('正在排队或转译', {
                            duration: 'long',
                            type: 'div'
                        })
                        return false
                    }
                    if (this.action == 3) {
                        this.showFileNw = true
                    } else {
                        this.showFile = true;
                    }

                },
                checkFile() {
                    let _that = this
                    if (_that.disabledInp) {
                        mui.toast('正在上传文件...', {
                            duration: 'long',
                            type: 'div'
                        })
                        return
                    }
                    wx.invoke("ext_FileBrowser_StartPreView", {
                        appPath:localStorage.getItem("AIFilePath") ? localStorage.getItem("AIFilePath") : ''
                    }, function (res) {
                        // let recordArr = JSON.parse(res.result)
                        _that.channelId = "net_upload_" + _that.createNonceStr(16) + new Date()
                            .getTime() + "";
                        _that.progress = 0
                        wx.invoke("multiWindows_subscribe", {
                            channelId: _that.channelId
                        }, function (res) {
                            if (res.err_msg == "multiWindows_subscribe:ok") {
                                var progress = Number(res.data.progress) >= 100 ? 99 : Number(
                                    res.data.progress)
                                _that.progress = progress > _that.progress ? progress : _that
                                    .progress
                            }
                        })
                        console.log(res,"文件信息")
                        console.log(JSON.parse(res.result),"需要文件信息")
                        if (_that.isflageIOX) {
                            const suffix = res.name.split('.').reverse()[0]
                            if (!_that.formatList.includes(suffix)) {
                                mui.toast('选择的文件格式不支持', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            if (checkFileNameForSensitiveWords(res.name)) {
                                mui.toast('检测到敏感内容，请确认后再试。', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            if (Number(res.size) / 200000000 > 1) {
                                mui.toast('上传文件大小不能大于200MB', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            if (Number(res.size) / 100000000 > 1) {
                                _that.CHUNK_SIZE = 10 * 1024 * 1024 + ""
                            }
                            if (Number(res.size) / 40000000 > 1 && _that.showFileType == 'youx' && _that
                                .action == 0) {
                                mui.toast('上传文件大小不能大于40MB', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            _that.disabledInp = true
                            _that.checkList(res.filePath, res.name, _that.channelId)
                        } else {
                            let recordArr = JSON.parse(res.result)
                            const suffix = recordArr[0].name.split('.').reverse()[0]
                            if (!_that.formatList.includes(suffix)) {
                                mui.toast('选择的文件格式不受支持', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            if (checkFileNameForSensitiveWords(recordArr[0].name)) {
                                mui.toast('检测到敏感内容，请确认后再试。', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return false
                            }
                            if (Number(recordArr[0].fileSize) / 100000000 > 1) {
                                _that.CHUNK_SIZE = 10 * 1024 * 1024 + ""
                            }
                            if (Number(recordArr[0].fileSize) / 200000000 > 1) {
                                mui.toast('上传文件大小不能大于200MB', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            if (Number(recordArr[0].fileSize) / 40000000 > 1 && _that.showFileType ==
                                'youx' && _that.action == 0) {
                                mui.toast('上传文件大小不能大于40MB', {
                                    duration: 'long',
                                    type: 'div'
                                })
                                return
                            }
                            _that.disabledInp = true
                            _that.checkList(recordArr[0].path, recordArr[0].name, _that.channelId)
                        }
                    })
                },

                checkList(path, name, id, hash, index) {
                    let that = this
                    that.progressBar = true
                    let iscp_port
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    let Authentication = sessionStorage.getItem("Authentication");
                    const timestamp = new Date().getTime() + ""
                    let userId = sessionStorage.getItem("userId");
                    let sign = sm3(timestamp + "&" + userId)
                    that.fileName = name
                    let data = {
                        serverAddress: localUrlLink + iscp_port +
                            `/tjAiAssistant/storage/splitUpload2?channelId=${id}`,
                        filePath: path,
                        fragmentSize: that.CHUNK_SIZE,
                        fileName: name,
                        fileHash: hash ? hash : '',
                        upLoadFragmentIndex: index ? index : '',
                        channelId: id,
                        headerData: {
                            sign: sign,
                            userId: userId,
                            type: '0',
                            timestamp: timestamp,
                            Authentication: Authentication,
                        }
                    }
                    wx.invoke("ext_Net_FragmentUpload", {
                        data: data,
                    }, function (res) {
                        if (res.err_msg.endsWith(":ok")) { //成功结果
                            //上传完成
                            if (that.showFileType == 'yuyin') {
                                that.recording(id)
                            } else if (that.showFileType == 'youx') {
                                that.sendEmail(id)
                            }

                        } else if (res.err_msg.endsWith(":cancel")) {
                            that.cleanData();
                            return
                        } else {
                            //上传失败
                            if (that.myindex != Number(res.upLoadFragmentIndex)) {
                                that.myindex = Number(res.upLoadFragmentIndex);
                                that.retryNum = 0;
                            }
                            setTimeout(() => {
                                if (that.retryNum > 4) {
                                    // that.retryNum = 0
                                    if (that.action == 3) {
                                        that.showFileNw = false
                                    } else {
                                        that.showFile = false
                                    }
                                    var btnArray = ["取消", "确定"];
                                    var i = 0
                                    mui.confirm(
                                        "是否进行重试？",
                                        "上传失败",
                                        btnArray,
                                        (e) => {
                                            if (i > 0) return
                                            i++
                                            if (e.index == 1) {
                                                if (that.action == 3) {
                                                    that.showFileNw = true
                                                } else {
                                                    that.showFile = true
                                                }
                                                that.checkList(path, name, id, res.fileHash,
                                                    res.upLoadFragmentIndex)
                                            } else {
                                                that.cleanData()
                                            }
                                        }
                                    );
                                } else {
                                    that.retryNum++
                                    that.checkList(path, name, id, res.fileHash, res
                                        .upLoadFragmentIndex)
                                }
                            }, (that.retryNum + 1) * 1000)
                        }
                    })
                },
                cleanData() {
                    this.showPopdel = false
                    this.showFile = false;
                    this.showFileNw = false;
                    this.num = 0
                    this.disabledInp = false
                    this.progressBar = false
                    this.loading = false
                    this.finished = false
                    this.listData = []
                    this.getShorthandList();
                },
                delUplode() {
                    let _that_ = this
                    if (_that_.disabledInp) {
                        _that_.showFileNw = false
                        _that_.showFile = false
                        var btnArray = ["取消", "确定"];
                        var i = 0
                        mui.confirm(
                            "是否终止上传？",
                            "消息提醒",
                            btnArray,
                            (e) => {
                                if (i > 0) return
                                i++
                                if (e.index == 1) {
                                    console.log(_that_.channelId, "_that_.channelId")
                                    wx.invoke("ext_Net_FragmentUploadCancel", {
                                        data: {
                                            requestTag: _that_.channelId
                                        }
                                    }, function (response) {
                                        console.log("ext_Net_FragmentUploadCancel end", response);
                                    })
                                    _that_.cleanData();
                                } else {
                                    if (_that_.action == 3) {
                                        _that_.showFileNw = true
                                    } else {
                                        _that_.showFile = true
                                    }
                                }
                            }
                        );
                    } else {
                        _that_.showFileNw = false
                        _that_.showFile = false;
                    }
                },
                recording(id) {
                    userId = sessionStorage.getItem("userId");
                    unitId = sessionStorage.getItem("unitId");
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    let data = {
                        "id": id,
                        "userId": userId,
                        "unitId": unitId,
                        "timestamp": new Date().getTime() + ""
                    };
                    data = JSON.stringify(data)
                    let sign = sm3(data);
                    let AuthenticationSession = sessionStorage.getItem("Authentication");
                    $.ajax({
                        url: localUrlLink + iscp_port + "/tjAiAssistant/Recording/recordingFileConvert",
                        type: "post",
                        async: false,
                        dataType: "json",
                        data: data,
                        headers: {
                            "Content-Type": "application/json;charset=UTF-8",
                            Authentication: AuthenticationSession,
                            sign: sign
                        },
                        success: (res, txt, xhr) => {
                            if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                                let Authentication = xhr.getResponseHeader("Authentication")
                                if (res.code == 200) {
                                    if (Authentication) {
                                        sessionStorage.setItem("Authentication", Authentication);
                                        this.progress = 100
                                        mui.toast('上传成功', {
                                            duration: 1000,
                                            type: 'div'
                                        })
                                        setTimeout(() => {
                                            this.cleanData()
                                        }, 1500)
                                        this.getShorthandList();
                                    }
                                } else if (res.code == 500) {
                                    mui.toast(res.resultValue, {
                                        duration: 'long',
                                        type: 'div'
                                    })
                                } else {
                                    mui.toast('请求异常,请稍后再试', {
                                        duration: 'long',
                                        type: 'div'
                                    })
                                }
                            } else {
                                mui.toast('完整性校验失败', {
                                    duration: 'long',
                                    type: 'div'
                                })
                            }
                        },
                        error: (e) => {
                            // $(".curtainVoice").css("display", "none");
                            mui.toast('请求异常,请稍后再试', {
                                duration: 'long',
                                type: 'div'
                            })
                        },
                    });
                },

                // 右上角发送邮箱
                sendEmail(id) {
                    userId = sessionStorage.getItem("userId");
                    unitId = sessionStorage.getItem("unitId");
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    let data = {
                        "id": id,
                        "userId": userId,
                        "saveType": this.action,
                        "unitId": unitId,
                        "timestamp": new Date().getTime() + ""
                    };
                    data = JSON.stringify(data)
                    let sign = sm3(data);
                    let AuthenticationSession = sessionStorage.getItem("Authentication");
                    $.ajax({
                        url: localUrlLink + iscp_port + "/tjAiAssistant/Recording/recordSendMail",
                        type: "post",
                        async: false,
                        dataType: "json",
                        data: data,
                        headers: {
                            "Content-Type": "application/json;charset=UTF-8",
                            Authentication: AuthenticationSession,
                            sign: sign
                        },
                        success: (res, txt, xhr) => {
                            if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                                let Authentication = xhr.getResponseHeader("Authentication")
                                if (res.code == 200) {
                                    if (Authentication) {
                                        sessionStorage.setItem("Authentication", Authentication);
                                        this.progress = 100
                                        if (this.action == 3) {
                                            showConfirmDialog("同步完成，请及时到内网网站aioa.sgcc.com.cn下载使用"," ")
                                        } else {
                                            mui.toast('上传成功,已发送到内网邮箱', {
                                                duration: 1000,
                                                type: 'div'
                                            })
                                        }

                                        setTimeout(() => {
                                            this.cleanData()
                                        }, 1500)
                                    }
                                } else if (res.code == 500) {
                                    if (this.action == 3) {
                                        syncToast('同步失败', 1500, "error", true)
                                    } else {
                                        mui.toast(res.resultValue, {
                                            duration: 'long',
                                            type: 'div'
                                        })
                                    }

                                } else {
                                    mui.toast('请求异常,请稍后再试', {
                                        duration: 'long',
                                        type: 'div'
                                    })
                                }
                            } else {
                                mui.toast('完整性校验失败', {
                                    duration: 'long',
                                    type: 'div'
                                })
                            }
                        },
                        error: (e) => {
                            // $(".curtainVoice").css("display", "none");
                            mui.toast('请求异常,请稍后再试', {
                                duration: 'long',
                                type: 'div'
                            })
                        },
                    });
                },
                home() {
                    closeApp()
                    $(location).attr("href", "Home.html?flag=flag");
                },

                delPop() {
                    if (this.showPopdel) {
                        mui.toast('正在上传文件', {
                            duration: 'long',
                            type: 'div'
                        })
                        return false
                    }
                    this.count = 0,
                        this.showFile = false;
                    this.showFileNw = false;
                    this.num = 0
                    this.disabledInp = false
                    this.progressBar = false
                    this.loading = false
                    this.finished = false
                    this.listData = []
                    this.getShorthandList();
                },
                delAddConfirm(num, id) {
                    const _this = this
                    if (num === 0) {
                        window.vant.Dialog.confirm({
                                title: '删除文件',
                                confirmButtonColor: '#FF0000',
                                message: '删除后音频文件及转写结果不可恢复',
                                confirmButtonText: '删除',
                            })
                            .then(() => {
                                _this.delAdd(num, id)
                            })
                            .catch(() => {
                                // on cancel
                            });

                    } else if (num === 1) {
                        let obj = _this.listData.find(item => item.translation == 0 || item.translation == 2)
                        if (obj) {
                            mui.toast('正在排队或转译', {
                                duration: 'long',
                                type: 'div'
                            })
                        } else {
                            _this.delAdd(num, id)
                        }
                    }
                },
                // 语音删除功能跟转文字跟重试 三者一个接口
                delAdd(num, id) {
                    userId = sessionStorage.getItem("userId");
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    let data = {
                        "id": id,
                        "userId": userId,
                        "timestamp": new Date().getTime() + ""
                    };
                    data = JSON.stringify(data)
                    let sign = sm3(data);
                    let resResult
                    let AuthenticationSession = sessionStorage.getItem("Authentication");
                    var URL
                    if (num == 0) {
                        URL = "/tjAiAssistant/voice/deleteVoiceNotes"
                    } else {
                        URL = "/tjAiAssistant/voice/updateTranslationById"
                    }
                    $.ajax({
                        url: localUrlLink + iscp_port + URL,
                        type: "post",
                        async: false, //是否同步，false表示同步请求
                        dataType: "json",
                        data: data,
                        headers: {
                            "Content-Type": "application/json;charset=UTF-8",
                            Authentication: AuthenticationSession,
                            sign: sign
                        },
                        success: (res, txt, xhr) => {
                            if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                                let Authentication = xhr.getResponseHeader("Authentication")
                                if (res.code == 200) {
                                    if (Authentication) {
                                        sessionStorage.setItem("Authentication", Authentication);
                                        mui.toast(res.resultValue, {
                                            duration: 'long',
                                            type: 'div'
                                        })
                                        this.num = 0
                                        if (num == 0) {
                                            // 删除此条数据
                                            this.listData.splice(this.listData.findIndex(el => el
                                                .id == id), 1)
                                        } else {
                                            this.loading = false
                                            this.finished = false
                                            this.listData = []
                                            this.getShorthandList();
                                        }

                                    }
                                } else if (res.code == 500) {
                                    mui.toast(res.resultValue, {
                                        duration: '1000',
                                        type: 'div'
                                    })
                                } else {
                                    mui.toast('请求异常,请稍后再试', {
                                        duration: '1000',
                                        type: 'div'
                                    })
                                }
                            } else {
                                mui.toast('完整性校验失败', {
                                    duration: '1000',
                                    type: 'div'
                                })
                            }
                        },
                        error: (e) => {
                            mui.toast('请求异常,请稍后再试', {
                                duration: '1000',
                                type: 'div'
                            })
                        },
                    });
                },
                // 详情
                shorthandBtn(index, item) {
                    window.sessionStorage.setItem(
                        "OnSiteShorthandItem",
                        JSON.stringify(item)
                    );
                    if (item.access == 2 && item.translation != 1) { //实时语音并且是没有转写的或者是未转译完成的
                        $(location).attr("href", "OnShorthandDetails.html");
                    } else {
                        $(location).attr("href", "VoiceDetial.html");
                    }

                },
                shuaxin() {
                    $("#circle_img").css("animation", "circle 1s linear infinite")
                    setTimeout(() => {
                        this.num = 0
                        this.loading = false
                        this.finished = false
                        this.listData = []
                        this.getShorthandList(0, 1);
                    }, 1000)
                },
                // 语音列表接口
                getShorthandList(num, id) {
                    this.finished = true;
                    // $("#curtain").css("display", "block");
                    userId = sessionStorage.getItem("userId");
                    iscp_port = sessionStorage.getItem("iscp_port") || "";
                    this.num += 1
                    let data = {
                        "userId": userId, //用户id
                        "timestamp": new Date().getTime() + "",
                        "number": this.num,
                        "type": 0,
                    };
                    data = JSON.stringify(data)
                    let sign = sm3(data);
                    let AuthenticationSession = sessionStorage.getItem("Authentication");
                    $.ajax({
                        url: localUrlLink + iscp_port + "/tjAiAssistant/voice/queryNotesList",
                        type: "POST",
                        async: false, //是否同步，false表示同步请求
                        dataType: "json",
                        data: data,
                        headers: {
                            "Content-Type": "application/json;charset=UTF-8",
                            Authentication: AuthenticationSession,
                            sign: sign
                        },
                        success: (res, txt, xhr) => {
                            $("#curtain").css("display", "none");
                            $("#circle_img").css("animation", "none")
                            let sm3res = JSON.stringify(res)
                            if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                                let Authentication = xhr.getResponseHeader("Authentication")
                                if (res.code == 200) {
                                    if (Authentication) {
                                        sessionStorage.setItem("Authentication", Authentication);
                                    }
                                    this.total = res.resultValue.total
                                    // if (this.num == 1) {
                                    //     console.log(532, this.num)
                                    //      this.listData  = []
                                    // }
                                    res.resultValue.list.forEach((item) => {
                                        // 预计等待时间
                                        this.listData.push(item)
                                    })
                                    if (this.total == 0) {
                                        this.finished = true;
                                    }
                                    if (res.resultValue.list.length < 20) {
                                        this.finished = true;
                                    }
                                    // 加载状态结束
                                    this.loading = false;
                                    if (this.listData.length >= this.total) {
                                        this.finished = true;
                                    }
                                    this.listData.forEach((i) => {
                                        if (i.translation == 2 || i.translation == 0) {
                                            this.doSomething(i)
                                        }
                                    })
                                    if (id == 1) {
                                        mui.toast("刷新完成", {
                                            duration: 'long',
                                            type: 'div'
                                        })
                                    }
                                } else {
                                    mui.toast(res.resultValue, {
                                        duration: 'long',
                                        type: 'div'
                                    })
                                }
                            } else {
                                mui.toast('完整性校验失败', {
                                    duration: 'long',
                                    type: 'div'
                                })
                            }
                        },
                        error: (e) => {
                            $("#curtain").css("display", "none");
                            $("#circle_img").css("animation", "none")
                            mui.toast('请求异常,请稍后再试', {
                                duration: 'long',
                                type: 'div'
                            })
                        },
                    });
                },

                timeList() {
                    setTimeout(() => {
                        this.num = 0
                        this.loading = false
                        this.finished = false
                        this.listData = []
                        this.getShorthandList(0);
                    }, 5000)
                },
                doSomething(item) {
                    if (item.translation === 2) {
                        this.estInterval = null
                        this.estimate = item.estimate
                        this.estInterval = setInterval(() => {
                            if (this.estimate > 0) {
                                this.estimate--
                            }
                        }, 1000)
                    }
                    this.timeList()
                },
            },
        })
    </script>
</body>

</html>